package com.lindroy.todomvp.data

import android.accounts.AuthenticatorDescription
import java.util.*

/**
 * @author Lin
 * @date 2021/6/25
 * @function
 */
data class Task(
    var title: String = "",
    var description: String = "",
    var id:String = UUID.randomUUID().toString() //生成唯一识别码
){
    var isCompleted = false

    val titleForList: String
        get() = if (title.isNotEmpty()) title else description

    val isActive
        get() = !isCompleted

    val isEmpty
        get() = title.isEmpty() && description.isEmpty()
}
